<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
  <!--  
  <% 
     List<String>  bookList  = new ArrayList<>();
      bookList.add("java");
      bookList.add("C++");
      bookList.add("C语言");
      bookList.add("软件工程");
      bookList.add("操作系统");
      session.setAttribute("bookList", bookList);   
   %>
   -->
   
   <%
     Map<Integer,String> bookMap  = new LinkedHashMap<>();
      bookMap.put(1,"java");
      bookMap.put(2,"servlet");
      bookMap.put(3,"spring");
      pageContext.setAttribute("bookMap", bookMap);
   %>
   
   <table border="1" align="center">
        <tr>
           <th>编号</th>
           <th>书名</th>
           <th>操作</th>
         
         </tr>
     <c:forEach  var="book"  items="${bookMap}">
         <tr>
           <td>${book.key}</td>
           <td>${book.value}</td>
           <td>操作</td>
         
         </tr>
   
   
     </c:forEach>
   </table>
</body>
</html>